package com.autumn.xa.a.tuling.jvm;

/**
 * ClassName: UserFinalise1
 *
 * @Description:
 * @Author: wangqiuyang
 * @Date: 2022/6/25 4:50 PM
 * History:
 * <author>          <time>          <version>          <desc>
 * wangqiuyang    2022/6/25 4:50 PM   @Version 1.0        描述
 */
public class UserFinalise1 {
    private long id;

    private String uuid;

    public UserFinalise1(long id) {
        this.id = id;
    }

    public UserFinalise1(long id, String uuid) {
        this.id = id;
        this.uuid = uuid;
    }

    @Override
    protected void finalize() throws Throwable {
        OOMTest.list1.add(this);
        System.out.println("关闭资源，userid=" + id + "即将被回收");
    }
}
